import json
from typing import Dict, List

def load_config() -> Dict:
    """加载配置文件"""
    with open('config.json', 'r') as f:
        return json.load(f)

def get_cavity_configs() -> Dict:
    """获取腔体配置"""
    config = load_config()
    return config['CAVITY_CONFIGS']

def get_cavity_names() -> List[str]:
    """获取腔体名称列表"""
    config = load_config()
    return config['CAVITY_NAMES']

# 使用示例
if __name__ == '__main__':
    # 获取所有腔体配置
    cavity_configs = get_cavity_configs()
    print("腔体配置:", cavity_configs)
    
    # 获取所有腔体名称
    cavity_names = get_cavity_names()
    print("腔体名称:", cavity_names)
    
    # 获取特定腔体的配置
    cavity1_config = cavity_configs['Cavity1']
    print("Cavity1配置:", cavity1_config) 